c     assemble a table
c
      parameter(nmax = 400)
c
      character*8 ch(nmax)
      real*8 x, y, z, a1, a2, a3, a4, a5, a6
      integer nmax, i
      open (10, file='1s2')
      open (20, file='2p2')
      open (30, file='2s2')
      open (40, file='3p2')
      open (50, file='3d2')
      open (60, file='total')
      do i = 1, nmax
         read(10, *, end=1000, err=1000) x, a1
         read(20, *, end=1000, err=1000) x, a2
         read(30, *, end=1000, err=1000) x, a3
         read(40, *, end=1000, err=1000) x, a4
         read(50, *, end=1000, err=1000) x, a5
         read(60, *, end=1000, err=1000) x, a6
         write(*, 10) x, a6, a1, a2, a3, a4, a5
      end do
 1000 continue
      n = i - 1
c
 10   format(6(F8.2, ' & '), F8.2, ' \\\\')
      end
